package daer;

import java.awt.image.AreaAveragingScaleFilter;
import java.security.PublicKey;

public class Student extends Person{
    String no;
    double scoreEn;
    double scoreMath;
    double scoreCh;

    public Student(String no, double scoreEn, double scoreMath, double scoreCh) {
        this.no = no;
        this.scoreEn = scoreEn;
        this.scoreMath = scoreMath;
        this.scoreCh = scoreCh;
    }

    public Student(String name, int age, char sex, String no, double scoreEn, double scoreMath, double scoreCh) {
        super(name, age, sex);
        this.no = no;
        this.scoreEn = scoreEn;
        this.scoreMath = scoreMath;
        this.scoreCh = scoreCh;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public double getScoreEn() {
        return scoreEn;
    }

    public void setScoreEn(double scoreEn) {
        this.scoreEn = scoreEn;
    }

    public double getScoreMath() {
        return scoreMath;
    }

    public void setScoreMath(double scoreMath) {
        this.scoreMath = scoreMath;
    }

    public double getScoreCh() {
        return scoreCh;
    }

    public void setScoreCh(double scoreCh) {
        this.scoreCh = scoreCh;
    }
public void aver(){
        double a=(scoreEn+scoreCh+scoreMath)/3;
}
public void max(double[] arr) {
    double max = arr[0];
    for (int i = 0; i < arr.length; i++) {
        if (max < arr[i]) {
            max = arr[i];
        }
    }
}
public void min(double[]arr){
    double min =arr[0];
    for(int i = 0; i < arr.length;i++){
        if (min > arr[i]) {
            min = arr[i];
        }
    }
}
    public String toString() {
        String b=super.toString()+no+scoreMath+scoreEn+scoreCh;
        return b;
    }
}


